package com.jus.player.config;

public class AppConfig {
    public static final String MEDIA_TYPE_JSON = "application/json;charset=utf-8";
    public static final String SP_NAME = "sp_jus_data";
    public static final String XMLNS_ANDROID = "http://schemas.android.com/apk/res/android";
    public static final String LAYOUT_HEIGHT = "layout_height";

    public static final String[] SLIDE_TAB_TITLE = {"追剧", "热门", "推荐"};
    public static final String[] VIDEO_TYPE = {"热门", "新剧", "超能", "复仇", "重生", "逆袭", "甜宠", "虐恋", "古装"};
    //首页 默认展示推荐tab
    public static final int DEFAULT_TAB_HOME = 2;
    public static final int DEFAULT_TAB_PLAY = 0;
    public static final String GOOGLE_LOGIN = "GOOGLE登陆";
    public static final String FACE_BOOK_LOGIN = "FACEBOOK登陆";
    public static final String DEVICE_LOGIN = "";
    /**
     * 超过多少集开始打折
     */
    public static final int DISCOUNT_COUNT = 10;
    /**
     * 解锁一集的F币
     */
    public static final int EPISODE_PRICE = 200;

    /**
     * 同步锁对象
     */
    public static final Object historyLock = new Object();

    public static final int INT_1_ = -1;
    public static final int INT_0 = 0;
    public static final int INT_1 = 1;
    public static final int INT_2 = 2;
    public static final int INT_3 = 3;
    public static final int INT_4 = 4;
    public static final int INT_5 = 5;
    public static final int INT_6 = 6;
    public static final int INT_9 = 9;
    public static final int INT_10 = 10;
    public static final int INT_15 = 15;
    public static final int INT_20 = 20;
    public static final int INT_24 = 24;
    public static final int INT_30 = 30;
    public static final int INT_45 = 45;
    public static final int INT_60 = 60;
    public static final int INT_68 = 68;
    public static final int INT_72 = 72;
    public static final int INT_89 = 89;
    public static final int INT_90 = 90;
    public static final int INT_100 = 100;
    public static final int INT_118 = 118;
    public static final int INT_198 = 198;
    public static final int INT_200 = 200;
    public static final int INT_240 = 240;

    public static final String KEY_CATEGORY_ID = "category_id";
    public static final String SP_USER_ID = "SP_USER_ID";

    /*支付成功*/
    public final static int PAY_OK = 0;
    /*支付失败*/
    public final static int PAY_FAILED = -1;
    /*支付取消*/
    public final static int PAY_CANCEL = -2;

    /**
     * 商品ID配置
     */
    public static final String SP_PROCESSING_ORDER = "processing_order";
    /*public static final String PRODUCT_ID_DOLLAR_1 = "jus_tv0001";
    public static final String PRODUCT_ID_DOLLAR_6 = "short_recharge_006";
    public static final String PRODUCT_ID_DOLLAR_45 = "short_recharge_045";
    public static final String PRODUCT_ID_DOLLAR_68 = "short_recharge_068";
    public static final String PRODUCT_ID_DOLLAR_118 = "short_recharge_118";
    public static final String PRODUCT_ID_DOLLAR_198 = "short_recharge_198";*/

    public enum ProductInfo {
        PRODUCT_ID_DOLLAR_1("jus_tv0001", "recharge $1", 1),
        PRODUCT_ID_DOLLAR_6("short_recharge_006", "recharge $6", 6),
        PRODUCT_ID_DOLLAR_45("short_recharge_045", "recharge $45", 45),
        PRODUCT_ID_DOLLAR_68("short_recharge_068", "recharge $68", 68),
        PRODUCT_ID_DOLLAR_118("short_recharge_118", "recharge $118", 118),
        PRODUCT_ID_DOLLAR_198("short_recharge_198", "recharge $198", 198),
        ;

        private final String id;
        private final String name;
        private final double price;

        ProductInfo(String id, String name, double price) {
            this.id = id;
            this.name = name;
            this.price = price;
        }

        public static ProductInfo getInstanceById(String id) {
            for (ProductInfo info : ProductInfo.values()) {
                if (info.getId().equals(id)) {
                    return info;
                }
            }
            return null;
        }

        public String getId() {
            return id;
        }

        public String getName() {
            return name;
        }

        public double getPrice() {
            return price;
        }
    }

    /**
     * 支付配置
     */
    public static final String PRODUCT_ID_VIP_MONTH = "vip_month_9";
    public static final String PRODUCT_ID_VIP_SEASON = "app_vip_season";
    public static final String PRODUCT_ID_VIP_YEAR = "app_vip_year";

    public static final String PRODUCT_TYPE_KEY = "PRODUCT-TYPE";

}
